3.3.91 \(\int \frac {a+b \sin (c+\frac {d}{x})}{e+f x} \, dx\) [291]

Optimal. Leaf size=103 \[ \frac {a \log \left (f+\frac {e}{x}\right )}{f}+\frac {a \log (x)}{f}-\frac {b \text {Ci}\left (\frac {d}{x}\right ) \sin (c)}{f}+\frac {b \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )}{f}+\frac {b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{f}-\frac {b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f} \]

[Out]

a*ln(f+e/x)/f+a*ln(x)/f+b*cos(c-d*f/e)*Si(d*(f/e+1/x))/f-b*cos(c)*Si(d/x)/f-b*Ci(d/x)*sin(c)/f+b*Ci(d*(f/e+1/x
))*sin(c-d*f/e)/f

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3512, 14, 3384, 3380, 3383, 3398} \begin {gather*} \frac {a \log \left (\frac {e}{x}+f\right )}{f}+\frac {a \log (x)}{f}+\frac {b \sin \left (c-\frac {d f}{e}\right ) \text {CosIntegral}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{f}-\frac {b \sin (c) \text {CosIntegral}\left (\frac {d}{x}\right )}{f}+\frac {b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )}{f}-\frac {b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*Sin[c + d/x])/(e + f*x),x]

[Out]

(a*Log[f + e/x])/f + (a*Log[x])/f - (b*CosIntegral[d/x]*Sin[c])/f + (b*CosIntegral[d*(f/e + x^(-1))]*Sin[c - (
d*f)/e])/f + (b*Cos[c - (d*f)/e]*SinIntegral[d*(f/e + x^(-1))])/f - (b*Cos[c]*SinIntegral[d/x])/f

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3380

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[SinIntegral[e + f*x]/d, x] /; FreeQ[{c, d,
 e, f}, x] && EqQ[d*e - c*f, 0]

Rule 3383

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[CosIntegral[e - Pi/2 + f*x]/d, x] /; FreeQ
[{c, d, e, f}, x] && EqQ[d*(e - Pi/2) - c*f, 0]

Rule 3384

Int[sin[(e_.) + (f_.)*(x_)]/((c_.) + (d_.)*(x_)), x_Symbol] :> Dist[Cos[(d*e - c*f)/d], Int[Sin[c*(f/d) + f*x]
/(c + d*x), x], x] + Dist[Sin[(d*e - c*f)/d], Int[Cos[c*(f/d) + f*x]/(c + d*x), x], x] /; FreeQ[{c, d, e, f},
x] && NeQ[d*e - c*f, 0]

Rule 3398

Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] ||
IGtQ[m, 0] || NeQ[a^2 - b^2, 0])

Rule 3512

Int[((g_.) + (h_.)*(x_))^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*((e_.) + (f_.)*(x_))^(n_)])^(p_.), x_Symbol] :
> Dist[1/(n*f), Subst[Int[ExpandIntegrand[(a + b*Sin[c + d*x])^p, x^(1/n - 1)*(g - e*(h/f) + h*(x^(1/n)/f))^m,
 x], x], x, (e + f*x)^n], x] /; FreeQ[{a, b, c, d, e, f, g, h, m}, x] && IGtQ[p, 0] && IntegerQ[1/n]

Rubi steps

\begin {align*} \int \frac {a+b \sin \left (c+\frac {d}{x}\right )}{e+f x} \, dx &=-\text {Subst}\left (\int \left (\frac {a+b \sin (c+d x)}{f x}-\frac {e (a+b \sin (c+d x))}{f (f+e x)}\right ) \, dx,x,\frac {1}{x}\right )\\ &=-\frac {\text {Subst}\left (\int \frac {a+b \sin (c+d x)}{x} \, dx,x,\frac {1}{x}\right )}{f}+\frac {e \text {Subst}\left (\int \frac {a+b \sin (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{f}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {a}{x}+\frac {b \sin (c+d x)}{x}\right ) \, dx,x,\frac {1}{x}\right )}{f}+\frac {e \text {Subst}\left (\int \left (\frac {a}{f+e x}+\frac {b \sin (c+d x)}{f+e x}\right ) \, dx,x,\frac {1}{x}\right )}{f}\\ &=\frac {a \log \left (f+\frac {e}{x}\right )}{f}+\frac {a \log (x)}{f}-\frac {b \text {Subst}\left (\int \frac {\sin (c+d x)}{x} \, dx,x,\frac {1}{x}\right )}{f}+\frac {(b e) \text {Subst}\left (\int \frac {\sin (c+d x)}{f+e x} \, dx,x,\frac {1}{x}\right )}{f}\\ &=\frac {a \log \left (f+\frac {e}{x}\right )}{f}+\frac {a \log (x)}{f}-\frac {(b \cos (c)) \text {Subst}\left (\int \frac {\sin (d x)}{x} \, dx,x,\frac {1}{x}\right )}{f}+\frac {\left (b e \cos \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\sin \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{f}-\frac {(b \sin (c)) \text {Subst}\left (\int \frac {\cos (d x)}{x} \, dx,x,\frac {1}{x}\right )}{f}+\frac {\left (b e \sin \left (c-\frac {d f}{e}\right )\right ) \text {Subst}\left (\int \frac {\cos \left (\frac {d f}{e}+d x\right )}{f+e x} \, dx,x,\frac {1}{x}\right )}{f}\\ &=\frac {a \log \left (f+\frac {e}{x}\right )}{f}+\frac {a \log (x)}{f}-\frac {b \text {Ci}\left (\frac {d}{x}\right ) \sin (c)}{f}+\frac {b \text {Ci}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right ) \sin \left (c-\frac {d f}{e}\right )}{f}+\frac {b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (\frac {d \left (f+\frac {e}{x}\right )}{e}\right )}{f}-\frac {b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.13, size = 83, normalized size = 0.81 \begin {gather*} \frac {a \log (e+f x)-b \text {Ci}\left (\frac {d}{x}\right ) \sin (c)+b \text {Ci}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right ) \sin \left (c-\frac {d f}{e}\right )+b \cos \left (c-\frac {d f}{e}\right ) \text {Si}\left (d \left (\frac {f}{e}+\frac {1}{x}\right )\right )-b \cos (c) \text {Si}\left (\frac {d}{x}\right )}{f} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*Sin[c + d/x])/(e + f*x),x]

[Out]

(a*Log[e + f*x] - b*CosIntegral[d/x]*Sin[c] + b*CosIntegral[d*(f/e + x^(-1))]*Sin[c - (d*f)/e] + b*Cos[c - (d*
f)/e]*SinIntegral[d*(f/e + x^(-1))] - b*Cos[c]*SinIntegral[d/x])/f

________________________________________________________________________________________

Maple [A]
time = 0.09, size = 164, normalized size = 1.59

method result size
risch \(\frac {a \ln \left (f x +e \right )}{f}-\frac {i b \,{\mathrm e}^{-\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, \frac {i d}{x}+i c -\frac {i \left (c e -d f \right )}{e}\right )}{2 f}+\frac {i b \expIntegral \left (1, \frac {i d}{x}\right ) {\mathrm e}^{-i c}}{2 f}+\frac {i b \,{\mathrm e}^{\frac {i \left (c e -d f \right )}{e}} \expIntegral \left (1, -\frac {i d}{x}-i c -\frac {-i c e +i d f}{e}\right )}{2 f}-\frac {i b \expIntegral \left (1, -\frac {i d}{x}\right ) {\mathrm e}^{i c}}{2 f}\) \(157\)
derivativedivides \(-d \left (\frac {a \ln \left (\frac {d}{x}\right )}{f d}-\frac {a \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{f d}+\frac {b \left (\sinIntegral \left (\frac {d}{x}\right ) \cos \left (c \right )+\cosineIntegral \left (\frac {d}{x}\right ) \sin \left (c \right )\right )}{f d}-\frac {b e \left (-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}\right )}{f d}\right )\) \(164\)
default \(-d \left (\frac {a \ln \left (\frac {d}{x}\right )}{f d}-\frac {a \ln \left (-c e +d f +e \left (c +\frac {d}{x}\right )\right )}{f d}+\frac {b \left (\sinIntegral \left (\frac {d}{x}\right ) \cos \left (c \right )+\cosineIntegral \left (\frac {d}{x}\right ) \sin \left (c \right )\right )}{f d}-\frac {b e \left (-\frac {\sinIntegral \left (-\frac {d}{x}-c -\frac {-c e +d f}{e}\right ) \cos \left (\frac {-c e +d f}{e}\right )}{e}-\frac {\cosineIntegral \left (\frac {d}{x}+c +\frac {-c e +d f}{e}\right ) \sin \left (\frac {-c e +d f}{e}\right )}{e}\right )}{f d}\right )\) \(164\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*sin(c+d/x))/(f*x+e),x,method=_RETURNVERBOSE)

[Out]

-d*(a/f/d*ln(d/x)-a/f/d*ln(-c*e+d*f+e*(c+d/x))+b/f/d*(Si(d/x)*cos(c)+Ci(d/x)*sin(c))-b*e/f/d*(-Si(-d/x-c-(-c*e
+d*f)/e)*cos((-c*e+d*f)/e)/e-Ci(d/x+c+(-c*e+d*f)/e)*sin((-c*e+d*f)/e)/e))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e),x, algorithm="maxima")

[Out]

b*(integrate(1/2*sin((c*x + d)/x)/((f*x + e)*cos((c*x + d)/x)^2 + (f*x + e)*sin((c*x + d)/x)^2), x) + integrat
e(1/2*sin((c*x + d)/x)/(f*x + e), x)) + a*log(f*x + e)/f

________________________________________________________________________________________

Fricas [A]
time = 0.36, size = 135, normalized size = 1.31 \begin {gather*} \frac {2 \, b \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) - 2 \, b \cos \left (c\right ) \operatorname {Si}\left (\frac {d}{x}\right ) + 2 \, a \log \left (f x + e\right ) + {\left (b \operatorname {Ci}\left (\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right ) + b \operatorname {Ci}\left (-\frac {{\left (d f x + d e\right )} e^{\left (-1\right )}}{x}\right )\right )} \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) - {\left (b \operatorname {Ci}\left (\frac {d}{x}\right ) + b \operatorname {Ci}\left (-\frac {d}{x}\right )\right )} \sin \left (c\right )}{2 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e),x, algorithm="fricas")

[Out]

1/2*(2*b*cos(-(d*f - c*e)*e^(-1))*sin_integral((d*f*x + d*e)*e^(-1)/x) - 2*b*cos(c)*sin_integral(d/x) + 2*a*lo
g(f*x + e) + (b*cos_integral((d*f*x + d*e)*e^(-1)/x) + b*cos_integral(-(d*f*x + d*e)*e^(-1)/x))*sin(-(d*f - c*
e)*e^(-1)) - (b*cos_integral(d/x) + b*cos_integral(-d/x))*sin(c))/f

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a + b \sin {\left (c + \frac {d}{x} \right )}}{e + f x}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e),x)

[Out]

Integral((a + b*sin(c + d/x))/(e + f*x), x)

________________________________________________________________________________________

Giac [A]
time = 3.21, size = 172, normalized size = 1.67 \begin {gather*} \frac {b d \operatorname {Ci}\left ({\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) \sin \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) - b d \operatorname {Ci}\left (-c + \frac {c x + d}{x}\right ) \sin \left (c\right ) - b d \cos \left (-{\left (d f - c e\right )} e^{\left (-1\right )}\right ) \operatorname {Si}\left (-{\left (d f - c e + \frac {{\left (c x + d\right )} e}{x}\right )} e^{\left (-1\right )}\right ) + b d \cos \left (c\right ) \operatorname {Si}\left (c - \frac {c x + d}{x}\right ) + a d \log \left (-d f + c e - \frac {{\left (c x + d\right )} e}{x}\right ) - a d \log \left (c - \frac {c x + d}{x}\right )}{d f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*sin(c+d/x))/(f*x+e),x, algorithm="giac")

[Out]

(b*d*cos_integral((d*f - c*e + (c*x + d)*e/x)*e^(-1))*sin(-(d*f - c*e)*e^(-1)) - b*d*cos_integral(-c + (c*x +
d)/x)*sin(c) - b*d*cos(-(d*f - c*e)*e^(-1))*sin_integral(-(d*f - c*e + (c*x + d)*e/x)*e^(-1)) + b*d*cos(c)*sin
_integral(c - (c*x + d)/x) + a*d*log(-d*f + c*e - (c*x + d)*e/x) - a*d*log(c - (c*x + d)/x))/(d*f)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {a+b\,\sin \left (c+\frac {d}{x}\right )}{e+f\,x} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*sin(c + d/x))/(e + f*x),x)

[Out]

int((a + b*sin(c + d/x))/(e + f*x), x)

________________________________________________________________________________________